#CMakeLists /crazy_race/src

add_subdirectory (libraries)

find_package (GLUT REQUIRED)
find_package (OpenGL REQUIRED)


include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})

add_executable (crazyrace main.cpp)

#add_executable (backgroundtest backgroundtrial.cpp)

#target_link_libraries (backgroundtest  libs ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} SDL SDL_mixer)


target_link_libraries(crazyrace libs ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} SDL SDL_mixer) 


SET(CMAKE CXX FLAGS -lglut -lGLU -lGL )



# add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
#WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)

